Renew Without Group API
POST /renewWithoutGroup
Description
This API endpoint allows you to renew a subscription for a user without assigning them to a group. It is used to extend the subscription duration and update subscription-related details.
Request Body
The request utilizes GraphQL to perform the renewWithoutGroup
mutation.
Mutation:
mutation renewWithoutGroup ($username: String!, $days: Int!) {
renewWithoutGroup (username: $username, days: $days) {
duration
multiLoginCount
expiresAt
createdAt
updatedAt
dailyBandwidth
downloadUpload
}
}
Variables:
{
"username": "<User_Username>",
"days": <Number_of_Days_to_Renew>
}
- username (String): The username of the user whose subscription is to be renewed.
- days (Int): The number of days to extend the subscription.
Response:
-
Success (200 OK):
- If the renewal is successful, the response will include the updated subscription details.
{
"data": {
"renewWithoutGroup": {
"duration": "<New_Duration>",
"multiLoginCount": "<Updated_Login_Count>",
"expiresAt": "<New_Expiry_Date>",
"createdAt": "<Creation_Date>",
"updatedAt": "<Update_Date>",
"dailyBandwidth": "<Updated_Bandwidth>",
"downloadUpload": "<Updated_Download_Upload_Details>"
}
}
} -
Error (4XX/5XX):
- If there is an issue with the renewal process, the response will include an appropriate error message and status code.
Note:
Ensure that the username is valid and corresponds to an existing user. The number of days should be a positive integer representing how long the subscription should be extended. This API helps manage subscription renewals directly without affecting user group assignments.